<!DOCTYPE html>
<html>

{include file='public/header'}

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="javascript:void(0)">首页</a>
            <a href="javascript:void(0)">抖音私域</a>
            <a><cite>群口令</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" id="reload" title="刷新">
            <i class="layui-icon" style="line-height:30px"><i class="iconfont">&#xe6aa;</i></i>
        </a>
    </div>
    <div class="x-body">
        <table id="groupPwd" lay-filter="groupPwd"></table>
    </div>
    <script type="text/html" id="toolbarDemo">
        <div class="layui-btn-container">
            <button class="layui-btn layui-btn-sm" lay-event="add">新增群口令</button>
        </div>
    </script>
    <script>
        let params = {
            elem: '#groupPwd'
            , toolbar: '#toolbarDemo'
            , url: '/admin/openDouyin/getGroupPassword' //数据接口
            , id: 'groupPwd'
            , page:false
            , cols: [[ //表头
                { field: 'group_name', title: '群名', width: 120}, 
                { field: 'expiration_day', title: '有效期' }, 
                { field: 'password', title: '群口令'}, 
                { field: 'group_fans_id', title: '关联群id'}, 
            ]]
        }
        tableList(params)
        layui.use('table', function () {
                var table = layui.table;
                table.on('toolbar(groupPwd)', function (obj) {
                    var event = obj.event;
                    if (event === 'add') {
                        x_admin_show('新增群口令', `./pwdinfo.html`, 650, 600);
                    }
                });
            });
    </script>
</body>

</html>